package com.mashibing.juc.c_017;

/**
 * 不要使用String类型作为锁
 * @author: Yuanzt
 * @Date: 2021/3/26
 */
public class T {

    String s1 = "hello";
    String s2 = "world";

    void m1(){
        synchronized (s1){};
    }

    void m2(){
        synchronized (s2){};
    }
}
